package de.hsf.bp.netdoc.gui;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import javax.swing.JCheckBox;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class NewProject extends JDialog {
	
	GuiView myGUI; 
	
	private final JPanel contentPanel = new JPanel();
	private JTextField textField;
	private JTextField textField_1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			NewProject dialog = new NewProject();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
			dialog.setModal(true);			
            
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public NewProject() {
		setTitle("New Project");
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		
		JLabel lblNewProject = new JLabel("New Project");
		lblNewProject.setBounds(10, 11, 414, 14);
		contentPanel.add(lblNewProject);
		
		JLabel lblProjectname = new JLabel("ProjectName");
		lblProjectname.setBounds(10, 62, 74, 14);
		contentPanel.add(lblProjectname);
		
		textField = new JTextField();
		textField.setBounds(133, 59, 291, 20);
		contentPanel.add(textField);
		textField.setColumns(10);
		
		JLabel lblLocation = new JLabel("location");
		lblLocation.setBounds(10, 171, 74, 14);
		contentPanel.add(lblLocation);
		
		textField_1 = new JTextField();
		textField_1.setBounds(94, 168, 221, 20);
		contentPanel.add(textField_1);
		textField_1.setColumns(10);
		
		JButton btnBrowse = new JButton("browse");
		btnBrowse.setBounds(335, 167, 89, 23);
		contentPanel.add(btnBrowse);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						dispose();
					}
				});
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}
}
